jenkins:
  slave_env:
      API_ENV: live
      API_PATH: /home/lighttpd/api
      API_STORAGE_PATH: /home/lighttpd/api-storage
      API_URL: api.jobstreet.com
      MEMCACHED_SERVERS: "[['host' => 'papi-1-sg1.jobstreet.com', 'port' => 11211, 'weight' => 100],['host' => 'papi-2-sg1.jobstreet.com', 'port' => 11211, 'weight' => 100],['host' => 'papi-3-sg1.jobstreet.com', 'port' => 11211, 'weight' => 100],['host' => 'papi-4-sg1.jobstreet.com', 'port' => 11211, 'weight' => 100],['host' => 'papi-5-sg1.jobstreet.com', 'port' => 11211, 'weight' => 100],['host' => 'papi-6-sg1.jobstreet.com', 'port' => 11211, 'weight' => 100],['host' => 'papi-1-sg2.jobstreet.com', 'port' => 11211, 'weight' => 100],['host' => 'papi-2-sg2.jobstreet.com', 'port' => 11211, 'weight' => 100]] "
      PAPI_LOCAL_DOMAIN: {{ salt['grains.get']('jenkins:node_name') }}.jobstreet.com
      SERVER_URL: {{ salt['grains.get']('fqdn', '') }}
      WEB_PATH: /home/lighttpd/api-root

lighttpd:
  max_worker: {{ salt['grains.get']('num_cpus', '1') }}

vhost:
  papi:
    -
      name: papi-live
      host_header: papi-
      document_root: /home/lighttpd/api-root
      additional_config: |
        url.rewrite-once = (
          "^/monitor(.*)" => "v/index.php/monitor$1",
          "^/(v[^/\?]*)/$" => "$1/doc/swagger.html",
          "^/(v[^/\?]*)/(.*(swagger).*)$" => "$1/doc/$2",
          "^/(v[^/\?]*)/((css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf))$" => "$1/doc/$2",
          "^/(v[^/\?]*)/(.*(favicon|robots|sitemap).*)$" => "$1/$2",
          "^/(v[^/\?]*)/(.*)$" => "$1/index.php/$2",
          "^/(.+)$" => "v/$1"
        )

    -
      name: api-live
      host_header: api.jobstreet.com
      document_root: /home/lighttpd/api-root
      additional_config: |
        url.rewrite-once = (
          "^/(v[^/\?]*)/$" => "$1/doc/swagger.html",
          "^/(v[^/\?]*)/(.*(swagger).*)$" => "$1/doc/$2",
          "^/(v[^/\?]*)/((css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf))$" => "$1/doc/$2",
          "^/(v[^/\?]*)/(.*(favicon|robots|sitemap).*)$" => "$1/$2",
          "^/(v[^/\?]*)/(.*)$" => "$1/index.php/$2",
          "^/(.+)$" => "v/$1"
        )

    -
      name: api-lb
      host_header: api-lb-sg1.jobstreet.com
      document_root: /home/lighttpd/api-root
      additional_config: |
        url.rewrite-once = (
          "^/(v[^/\?]*)/$" => "$1/doc/swagger.html",
          "^/(v[^/\?]*)/(.*(swagger).*)$" => "$1/doc/$2",
          "^/(v[^/\?]*)/((css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf))$" => "$1/doc/$2",
          "^/(v[^/\?]*)/(.*(favicon|robots|sitemap).*)$" => "$1/$2",
          "^/(v[^/\?]*)/(.*)$" => "$1/index.php/$2",
          "^/(.+)$" => "v/$1"
        )

    -
      name: api-sg1
      host_header: api-sg1.jobstreet.com
      document_root: /home/lighttpd/api-root
      additional_config: |
        url.rewrite-once = (
          "^/(v[^/\?]*)/$" => "$1/doc/swagger.html",
          "^/(v[^/\?]*)/(.*(swagger).*)$" => "$1/doc/$2",
          "^/(v[^/\?]*)/((css|img|js|fonts)/.*\.(jpg|jpeg|gif|png|swf|avi|mpg|mpeg|mp3|flv|ico|css|js|woff|ttf))$" => "$1/doc/$2",
          "^/(v[^/\?]*)/(.*(favicon|robots|sitemap).*)$" => "$1/$2",
          "^/(v[^/\?]*)/(.*)$" => "$1/index.php/$2",
          "^/(.+)$" => "v/$1"
        )

    -
      name: monitor-live
      host_header: monitor.jobstreet.com
      document_root: /home/lighttpd/monitor-root
      additional_config: |
        url.rewrite-once = ()
